<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017\9\6 0006
  Time: 11:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType = "text/html;charset=UTF-8" language = "java" %>
<html>

<head>
    <link href = "/assets/css/bootstrap.min.css" rel = "stylesheet">
    <title>测试网页www</title>
</head>
<body>
<div id ="b">

</div>
</body>




<jsp:include page ="footer.jsp"></jsp:include>

<script  id="entry-template" type="text/x-handlebars-template">
    <div >
        <div><h3>{{title}}</h3></div>
        <div><p>{{details1}}</p></div>
        <div><p>{{details2}}</p></div>
        <div><p>{{details3}}</p></div>
        <div><p>{{details4}}</p></div>
    </div>
</script>


<script type="text/javascript">
    var source = $("#entry-template").html();
    var template = Handlebars.compile(source);
    var context = {title: "今天天气真好!", details1: "上班",details2:"下班",details3:"回家",details4:"放假"};
    var html = template(context);
    $("#b").html(html);
</script>
</html>
